package com.rightsidetech.activity.dto.request.ride;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

@Data
public class AgentSaveRideReq implements Serializable {

    @ApiModelProperty(value = "门店id",required = true)
    @NotNull(message = "门店id不可为空")
    private Long storeId;

    @ApiModelProperty(value = "电池型号",required = true)
    @NotBlank(message = "电池型号不允许为空")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9-./()【】]{0,}$",message = "电池型号不允许输入特殊符号")
    @Length(max = 30,message = "型号最大长度为30")
    private String model;

    @ApiModelProperty(value = "活动开始时间 yyyy-MM-dd",required = true)
    @NotNull(message = "活动开始时间不可为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    @ApiModelProperty(value = "活动结束时间 yyyy-MM-dd",required = true)
    @NotNull(message = "活动结束时间不可为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;
}
